/*
 * @Description: 
 * @Date: 2025-05-15 19:53:18
 * @LastEditTime: 2025-07-30 10:10:14
 */
import request from "../utils/request";

export function login(data) {
  return request({
    url: "/user/login",
    method: "post",
    data,
  });
}

export function loginByPhone(data) {
  return request({
    url: "/corpuser/login",
    method: "post",
    data,
  });
}

export function getInfo(token) {
  return request({
    url: "/user/info",
    method: "get",
  });
}

export function generateSSOToken(data) {
  return request({
    url: "/sysuser/generateSSOToken",
    method: "post",
    data
  });
}

export function logout(token) {
  return request({
    url: "/user/userLogout",
    method: "post",
    data: {
      token,
    },
  });
}

export function modifyPassword(data) {
  return request({
    url: "/user/changePassword",
    method: "post",
    data,
  });
}

export function ssoLogin(data) {
  return request({
    url: "/user/sso/login",
    // url: "/user/sso/testLogin",
    method: "post",
    data,
  })
}

export function zqtSsoLogin(data) {
  return request({
    url: "/user/zqtSsoLogin",
    method: "post",
    data
  });
}

export function addQuestionnaire(data) {
  return request({
    url: "/questionnaire/add",
    method: "post",
    data
  });
}

export function addScoreRecord(data) {
  return request({
    url: '/scorerecord/add',
    method: 'post',
    data
  })
}